class SalidaAlmacen < ActiveRecord::Base
  belongs_to :transportista
  belongs_to :receiving_ticket
  belongs_to :salida_autorizada_por_empleado, :class_name => "Empleado", :foreign_key =>"salida_autorizada_por"
  belongs_to :cargado_por_empleado, :class_name => "Empleado", :foreign_key =>"cargado_por"
  belongs_to :autorizada_almacen_por_empleado, :class_name => "Empleado", :foreign_key => "autorizada_almacen_por"
  belongs_to :tipo_vehiculo
  
  has_many :detalles_rt_salida, :class_name =>"DetalleRtSalida"
  accepts_nested_attributes_for :detalles_rt_salida
  has_many :rt_detalles, :through => :detalles_rt_salida#, :source =>:det_orden_compra
end
